package com.atcumt.meituan;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

public class Test {
    
    public static void main(String[] args) throws NumberFormatException, IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        // BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));

        int n = Integer.parseInt(reader.readLine());
        long[] nums = Arrays.stream(reader.readLine().split(" ")).mapToLong(Integer::valueOf).toArray();
        int minRes = solve(nums);
        System.out.println(minRes);
    }

    private static int solve(long[] num) {
        int res = 0;
        int count = 0;
        Map<Long, Integer> odd = new HashMap<>();
        Map<Long, Integer> even = new HashMap<>();
        for (int i = 0; i < num.length; i++) {
            if (i % 2== 0) {
                odd.put(num[i], odd.getOrDefault(num[i], 0) + 1);
            } else {
                even.put(num[i], even.getOrDefault(num[i], 0) + 1);
            }
        }
        List<Map.Entry<Long, Integer>> oddlist = new ArrayList<>(odd.entrySet());
        oddlist.sort(new Comparator<Map.Entry<Long, Integer>>() {

            @Override
            public int compare(Entry<Long, Integer> o1, Entry<Long, Integer> o2) {
                // TODO Auto-generated method stub
                return o2.getValue() - o1.getValue();
            }
        });
        List<Map.Entry<Long, Integer>> evenlist2 = new ArrayList<>(even.entrySet());
        evenlist2.sort(new Comparator<Map.Entry<Long, Integer>>() {

            @Override
            public int compare(Entry<Long, Integer> o1, Entry<Long, Integer> o2) {
                // TODO Auto-generated method stub
                return o2.getValue() - o1.getValue();
            }
        });
        if (oddlist.get(0).getKey().equals(evenlist2.get(0).getKey())) {
            if (oddlist.get(0).getValue() > evenlist2.get(0).getValue()) {
                res = oddlist.get(0).getValue() + evenlist2.get(1).getValue();
            } else {
                res = oddlist.get(1).getValue() + evenlist2.get(0).getValue();
            }
        } else {
            res = oddlist.get(0).getValue() + evenlist2.get(0).getValue();
        }
        count = num.length - res;
        return count;
    }
}
